
let text = "this has been a short summer";
let pattern = /(.)hort/g;

console.log(pattern.test(text));
console.log(RegExp.input);
console.log(RegExp.leftContext);
console.log(RegExp.rightContext);
console.log(RegExp.lastMatch);
console.log(RegExp.lastParen);

//以上代码创建了一个模式，用于搜索任何后跟"hort"的字符，并把第一个字符放在了捕获组中
// true
// this has been a short summer
// this has been a 
//  summer
// short
// s
